package com.liuqi.business.service;

import com.liuqi.base.BaseService;
import com.liuqi.business.model.MiningOrderModel;
import com.liuqi.business.model.MiningOrderModelDto;
import com.liuqi.response.ReturnResponse;

import java.math.BigDecimal;

public interface MiningOrderService extends BaseService<MiningOrderModel,MiningOrderModelDto>{

    /**
     * 创建合约订单
     * @param userId
     * @param configId
     * @param num
     * @return
     */
    ReturnResponse createOrder(long userId, long configId, BigDecimal num);

    /**
     * 消耗CRA币
     * @param userId
     * @param num
     * @return
     */
    ReturnResponse consumeCra(long userId,long currencyId, BigDecimal num);

    /**
     * 创建等级订单
     * @param userId
     * @param gradeId
     * @param num
     * @return
     */
    ReturnResponse createGradeOrder(long userId, long gradeId, BigDecimal num);
}
